package site.wanjiahao.handler.client;

import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import site.wanjiahao.message.response.ListGroupMembersResponseMessage;

@ChannelHandler.Sharable
public class ListGroupMembersResponseMessageHandler extends SimpleChannelInboundHandler<ListGroupMembersResponseMessage> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, ListGroupMembersResponseMessage msg) throws Exception {
        if (msg.getMembers() != null) {
            System.out.println("当前用户组：" + msg.getGName() + "共有" + msg.getMembers().size() + "在线用户");
            System.out.println(msg.getMembers());
        }
    }
}
